package org.opencare.ndwc.account.dao.impl;

import org.opencare.ndwc.account.dao.UserDAO;
import org.opencare.ndwc.account.domain.User;
import org.springframework.stereotype.Repository;


/**
 * UserDAOImpl
 */
@Repository
public class UserDAOImpl extends GenericDAOImpl<User, Long> implements UserDAO {

	/**
	 * Required constructor
	 */
	public UserDAOImpl() {
		super(User.class);
	}

	public User findByUsername(String username) {
		return (User) getEntityManager().createNamedQuery("User.findByUsername")
				.setParameter("username", username).getSingleResult();
	}
	

}
